
// createRouter: 创建路由实例对象
// createWebHistory: 创建history模式的路由（hash / history）

import { createRouter, createWebHistory } from 'vue-router'
// 导入路由级别的组件
// import HomeView from '../views/HomeView.vue'
import BigScreen from '../views/BigScreen.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/big-screen',
    },
    {
      path: '/big-screen',
      name: 'big-screen',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      // 组件按需加载/懒加载
      // component: () => import('../views/BigScreen.vue'),
      component: BigScreen,
    },
  ],
})

export default router
